Import Interface Dialog

Import interface dialog

Synchronization

When you import an interface, you can choose to compare the signals by name or external name.

Name

The signal name specified in the Declaration Editor is compared to the signal name in the file to be imported.

Import interface, synchronization by name

Select Name:

In the example above, TPT recognizes the signals by name. The external name of channel_b will be removed, channel_a gets the external name ABC, and param_1 receives the external name DEF.

External Name

The external name is specified in the Declaration Editor in a mapping that uses a Rename mapping flavor, see Mapping Flavor - Rename. TPT finds the signals whose external name in TPT equals the signal name of the external file.

Import interface, synchronization by external name

Select External Name:

In the example above, TPT recognizes the signals by their external name. The external name ABC is linked to the signal name channel_b in the TPT project and to channel_a in the file to be imported. Therefore channel_a is removed and channel_b is renamed to channel_a.

The Name column must be activated for the name change to take effect.

When you select External Name, the Name column is disabled by default, so the signal name of the external file does not overwrite the signal name in TPT. Enable the Name column if you like to overwrite the signal name. Once you enabled the Name column it stays enabled until you manually disable it.

Mapping

All target mappings are available in the drop-down list.

Select a target mapping

The target mapping will affect the status calculation of the signals to be imported.

If mapping information is imported, this information is stored in the mapping selected here, regardless of what you selected previously in the wizard.

Filter options

To filter the signals depending on their types, click on the corresponding icon (see (1) in Figure "Filter options").

Filter options

To filter the signals depending on their import status: Changed, Unchanged, New, Removed, select the corresponding check box (2). To filter the signals depending on their names, enter a term in the text field (3). To activate the use of regular expressions for search and filter, select Regular Expressions.

For example, the term ^L.*(g|y)$ will search a signal that begins with an "L" and ends with an "g" or an "y". The search is not case-sensitive.

The selected settings, see (3) in Figure "Filter options", are retained.

Status

When importing an interface, the signals are marked as follows:

New

The signal is unknown to the currently opened TPT project; this could be the effect of renaming the signal in the interface of the currently opened TPT project.

Unchanged

The signal already exists in the currently opened TPT project with the same properties.

Changed

The signal already exists in the currently opened TPT project but with other properties. Changed elements are highlighted. Hover with the mouse over the highlighted area to see the old and the new value.

Removed

The signal is found in the currently opened TPT project but not in the interface you are about to import.

Action

There are six actions available that can be selected from a drop-down list in the Action column:

Add

Adds a new item to the declaration.

Modify

Applies changes to the item.

Ignore

Nothing is changed.

Remove

The item will be deleted.

Rename

Properties of the removed signal are overwritten with the properties of the new signal. This also applies to the name if the Import rename to mapping check box is not selected.

Hide

The Hidden flag of the Rename mapping flavor in the Declaration Editor is set to true. The signal will be hidden (grounded) not deleted.

It depends on the Status of the signal which action you can select.

Select an action

If a signal has the status Removed, you can select the action ignore, rename, hide, or remove. If a signal has the status Changed, you can ignore or modify it. If a signal has the status New, you can add, ignore, or rename it.

Instead of setting actions signal for signal, you can click the buttons Default All, Ignore All or Default Selected. They are described below.

Rename

A renaming of signals is only possible when a signal from the TPT project is marked as to be Removed and at least one signal from the file to be imported is marked as New.

Signals marked as "Removed" and "New"

Be aware that signals marked as Removed will be deleted from the TPT project. Check your TPT project first to avoid failed tests due to missing signals.

The signal to be removed is not replaced by the signal to be imported. It is kept, but it changes its name and its properties. Simultaneously, a refactoring is performed by TPT.

Limitations 
Refactoring will have no effect in the MATLAB view, the Dashboard script, in the Signal Comparison assesslet, and in the Condition Tree assesslet.
When the rename leads to a change of the mode and/or data type, you might need to check the values added to this signal in step lists and assesslets.
Example

A signal channel_a is declared in the TPT project. The file to be imported contains a signal channel_b. TPT suggests to remove signal channel_a and to add signal channel_b. If you select Rename in column Action of signal channel_b, it is not added as a new signal, but another signal to be removed, is renamed and the properties of signal channel_b are copied to the renamed signal. Click in the Rename column of signal channel_b to select the signal to be renamed.

Select the signal to be kept and renamed

If you select signal channel_a from the drop-down list, TPT automatically changes the value in column Action from Ignore to Rename and inserts the name of signal channel_b in column Rename of the selected signal channel_a.

Inserted name of signal "channel_b" in column "Rename "

By clicking OK, signal channel_a of the TPT project is renamed to channel_b and takes the following properties over:

  • Type
  • Data type
  • Unit
  • Value
  • Record
  • Mode
  • Group
  • Description
You can exclude properties from being imported for all signals to be imported, see Import Interface - Exclude Content from Being Imported.

Default All

Applies the following default actions: 

Ignore All

Ignores all changes.

Default Selected

Applies the default actions to the selected elements.

Hide new signals in other mappings

By default, new signals are not hidden. Select this check box if you want new signals to receive the Hidden flag in all mappings with a Rename flavor except in the mapping selected as target mapping.

Import rename to mapping

If a Rename action is performed, the signal to be removed keeps its name but takes over the properties of the new signal. The name of the new signal is added to the Rename mapping flavor of the signal to be removed.

Import rename to mapping check box

The name of the new signal is added as external name to the signal to be removed.

Rename imported to mapping

TPT adds a Rename mapping flavor to the selected target mapping or to a new mapping.

Import values to mapping

A change of the value is highlighted in the table. Hover with the mouse over the entry to see the old and the new value.

If deselected:

The Init_Value column is hidden unless the imported interface contains a Init Values mapping flavor with importable initial values. In case the interface to be imported contains no value or no importable values, the Import values to mapping check box is deactivated.

If selected:

You can manually activate the Value column. Then, the new value would be imported both to the Value and the Init Values mapping flavor. Deactivating the Init_Values column will automatically deselect the Import value to mapping check box.

Enums and constants are automatically imported if they are found in the interface.

Export to Excel

You can export information about all changes to an Excel file. Click Export to Excel to specify the file. All values in the lines that contain "Add", "Modify", "Rename" or "Remove" in column "Action" are exported to the file. For each property the columns: "old", "imported" and "now in TPT" are inserted in the Excel file.

Guess renames

This option is only available when at least one "New" and one "Removed" signal exists in the interface to be imported. Click on Guess renames to find matches for signal names automatically based on name similarities. Matches are shown in the Suggested signals renames dialog.

Suggested signal renames

Suggested signal renames

Select the checkbox to apply the rename, deselect the checkbox to discard the rename.

Click "OK" to link the selected rename pairs of "New"<->"Removed" items in the import table. You can still make changes/adaptations in this table.